<!-- Basic UI for running the demo in the browser -->

<html>
  <head>
    <title>S-PCA under MPC</title>
    <style>
      .error {
        color: #FF0000;
      }
    </style>
    <script src="https://code.jquery.com/jquery-1.11.1.js"></script>
    <script src="/dist/jiff-client.js"></script>

    <!-- <script src="/lib/cryptico.min.js"></script> -->
    <script src="https://cdnjs.cloudflare.com/ajax/libs/mathjs/3.16.5/math.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/numeric/1.2.6/numeric.min.js"></script>

    <script src="/bignumber.js/bignumber.min.js"></script>
    <script src="/lib/ext/jiff-client-bignumber.js"></script>
    <script src="/lib/ext/jiff-client-fixedpoint.js"></script>
    <script src="/lib/ext/jiff-client-negativenumber.js"></script>

    <!-- Contains UI Handlers and Input Checks -->
    <script type="text/javascript" src="./client.js"></script>

    <!-- Contains the MPC implementation -->
    <script type="text/javascript" src="./mpc.js"></script>
  </head>
  <body>
    <h1>Connect JIFF</h1>
    <label for="computation_id">Computation ID</label><input id="computation_id" value="test"></input><br/><br/>
    <label for="count">Party Count</label> <input id="count" pattern="[0-9]*" value="2"> &nbsp; <button id="connectButton" onclick="connect();">Connect</button>
    <br/><br/>
    <hr/>
    <h1>Dimensionality Reduction with S-PCA</h1>
    <label>Enter an array of 3 elements</label><br/></br>
    <textarea id="inputText" rows="5" cols="35">[1,3,2]</textarea><br/><br/>
    <button onclick="pca();" disabled="disabled" id="button">Compute PCA</button><br/>
    <div id="output"></div>
  </body>
</html>
